import { createApp } from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'

// 导入重置浏览器默认样式 -> 让所有浏览器默认样式一致
import 'normalize.css'
// 导入公共样式
import '@/styles/common.less'

// 导入小兔鲜儿组件库
import RabbitUi from 'rabbit-ui-core'
import 'rabbit-ui-core/dist/rabbit-ui.css'

// 导入自己写的插件
import MyPlugins from '@/components/index.js'

// 注册全局指令
import Directives from '@/directives'

// 在入口注册全局组件
// import Skeleton from '@/components/Skeleton'
/**
 * vue2: Vue.component('元素名', 组件对象)
 * vue3: app.component('元素名', 组件对象)
 */
// 创建渲染根实例
const app = createApp(App)
// console.log('根实例', app)
// app.component('Skeleton', Skeleton)

// vue2 -> Vue.use(router)
// createApp(App).use(store).use(router).use(RabbitUi).mount('#app')
app.use(store).use(router).use(RabbitUi).use(MyPlugins).use(Directives).mount('#app')
